package cn.com.headfree.server.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;

import cn.com.headfree.server.dao.IUserLoginInfoDao;
import cn.com.headfree.server.entity.TUserLoginInfo;
@Repository("userLoginInfoDao")
public class UserLoginInfoDaoImpl extends BaseDaoImpl<TUserLoginInfo> implements IUserLoginInfoDao {

	@Override
	public TUserLoginInfo getUserLoginInfo(String userId) {
		String sql = "select * from t_user_login_info t where t.user_id=?";
		List<TUserLoginInfo> userInfos = this.findAllBySQL(TUserLoginInfo.class, sql, null, false, userId);
		if (userInfos != null && userInfos.size() > 0) {
			return userInfos.get(0);
		}
		return null;
	}

}
